'''
作业
'''
# 1.
list1 = [0, 1, 2, 3, 4]
print(list1[len(list1) // 2])
# 2.
print(sum(list1))
# 3.
print(list1[1::2])
# 4.
for x in list1:
    if x & 1 == 1:
        print(x)
# 5.
nums = [1, 2, 3, 4]
list2 = []
for x in nums:
    x *= 2
    list2.append(x)
print(list2)
# 6.
names = [1, 2, 2, 3, 5, 5]
print(list(set(names)))
# 7.
nums1 = []
list3 = []
for x in nums1:
    x = chr(x)
    list3.append(x)
print(list3)
# 8.
scores = [89, 99, 90, 88, 85, 95]
scores.remove(max(scores))
scores.remove(min(scores))
avg_sco = sum(scores) / len(scores)
print(avg_sco)
# 9.
A = [1, 'a', 4, 90]
B = ['a', 8, 'j', 1]
C = set(A).intersection(set(B))
print(list(C))
# 10.
nums = [19, 89, 90, 600, 1]
x = 1
for i in nums:
    if i > x:
        x = i
print(x)
# 11.
nums = [1, 2, 3, 1, 4, 2, 1, 3, 7, 3, 3]
count = 0
max_i = 0
for i in nums:
    if nums.count(i) > count:
        max_i = i
        count = nums.count(i)
print(max_i)
